package com.jy.appmarket.dialog;

import com.jy.appmarket.R;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.widget.TextView;

public class WaitDialog extends Dialog {

	private TextView mTitleTv;

	public WaitDialog(Context context) {
		super(context, R.style.custom_dialog_theme);
		init();
	}

	public void init() {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.wait_dialog);
		mTitleTv = findViewById(R.id.title);
	}

	/**
	 * 设置并显示标题
	 * 
	 * @param title
	 *            要显示的标题字符串
	 * @return 当前的对话框对象
	 */
	public WaitDialog showTitle(String title) {
		mTitleTv.setText(title);
		return this;
	}
}
